<template>
  <div class="container">
    <div style="margin-bottom: 10px;">上传公司信息</div>
    <el-form :model="form" label-width="100px">
        <el-form-item label="公司名">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item label="公司logo地址">
          <el-input v-model="form.avatarUrl"></el-input>
        </el-form-item>
        <el-form-item label="所属行业">
          <el-input v-model="form.industry"></el-input>
        </el-form-item>
        <el-form-item label="公司描述" style="width: 100%;">
          <el-input type="textarea" v-model="form.description"></el-input>
        </el-form-item>
        <el-form-item class="buttonGroup">
          <el-button type="primary" @click="submitCompany">保存</el-button>
        </el-form-item>
      </el-form>
  </div>
</template>

<script>
export default {
  data () {
    return {
      form: {}
    }
  },
  methods: {
    async submitCompany () {
      await this.$http.post('/job/company', this.form)
      this.$message.success('上传成功！')
      this.$router.push('/submitJob')
    }
  }
}
</script>

<style lang="less" scoped>
.container {
  padding: 20px 200px;
}
.el-form {
  display: flex;
  flex-wrap: wrap;
  .el-form-item {
    width: 50%;
  }
}
</style>
